package framework
{
	import framework.async.HandleResponder;

	import mx.rpc.AsyncToken;

	public function handle(asyncToken:AsyncToken, resultHandler:Function, faultHandler:Function = null):AsyncToken
	{
		var responder:HandleResponder = new HandleResponder;
		responder.resultHandler = resultHandler;
		responder.faultHandler = faultHandler;
		asyncToken.addResponder(responder);
		return asyncToken;
	}
}